import time

from app.modules.apps.container_tomcat import TomcatMultiWarApp, TomcatDepApp
from app.modules.common import network

tomcat = TomcatDepApp(app_id='ausyd:dep',
                      app_name='dep',
                      zone_home_path='/usr/local/app/uc.auaws.warehouse.ausyd',
                      nas_app_package_path='',
                      zone_alias='ausyd',
                      port=35380,
                      db_name='OWMS_AU')

tomcat.stop()
tomcat.uninstall_app()
tomcat.install_app()
tomcat.restart()
print tomcat.is_started()

time.sleep(3)
print tomcat.is_started()
time.sleep(3)
#tomcat.stop()
print tomcat.is_started()
